<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('统计分析按区站频率设置列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>点位名称：</label>
                                <input type="text" name="dwmc"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="dwmcJc"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="dwmcJp"/>
                            </li>
                            <li>
                                <label>级别：</label>
                                <input type="text" name="jb"/>
                            </li>
                            <li>
                                <label>父点位代码：</label>
                                <input type="text" name="fdwdm"/>
                            </li>
                            <li>
                                <label>单位ID：</label>
                                <input type="text" name="deptId"/>
                            </li>
                            <li>
                                <label>用户ID：</label>
                                <input type="text" name="userId"/>
                            </li>
                            <li>
                                <label>二级单位ID：</label>
                                <input type="text" name="ejdwId"/>
                            </li>
                            <li>
                                <label>二级单位名称：</label>
                                <input type="text" name="ejdwName"/>
                            </li>
                            <li>
                                <label>作业区ID：</label>
                                <input type="text" name="zyqId"/>
                            </li>
                            <li>
                                <label>作业区名称：</label>
                                <input type="text" name="zyqName"/>
                            </li>
                            <li>
                                <label>父部门id：</label>
                                <input type="text" name="parentId"/>
                            </li>
                            <li>
                                <label>父部门名称：</label>
                                <input type="text" name="parentName"/>
                            </li>
                            <li>
                                <label>部门ID：</label>
                                <input type="text" name="bmId"/>
                            </li>
                            <li>
                                <label>部门名称：</label>
                                <input type="text" name="bmName"/>
                            </li>
                            <li>
                                <label>：</label>
                                <input type="text" name="deptIdId"/>
                            </li>
                            <li>
                                <label>点位3级ID：</label>
                                <input type="text" name="dw3Id"/>
                            </li>
                            <li>
                                <label>点位3级名称：</label>
                                <input type="text" name="dw3Name"/>
                            </li>
                            <li>
                                <label>点位4级ID：</label>
                                <input type="text" name="dw4Id"/>
                            </li>
                            <li>
                                <label>点位4级名称：</label>
                                <input type="text" name="dw4Name"/>
                            </li>
                            <li>
                                <label>点位5级ID：</label>
                                <input type="text" name="dw5Id"/>
                            </li>
                            <li>
                                <label>点位5级名称：</label>
                                <input type="text" name="dw5Name"/>
                            </li>
                            <li>
                                <label>频率 秒：</label>
                                <input type="text" name="frequency"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:frequency:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:frequency:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:frequency:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:frequency:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:frequency:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:frequency:remove')}]];
        var prefix = ctx + "youtian/frequency";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "统计分析按区站频率设置",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'ID',
                    visible: false
                },
                {
                    field: 'dwmc',
                    title: '点位名称'
                },
                {
                    field: 'dwmcJc',
                    title: ''
                },
                {
                    field: 'dwmcJp',
                    title: ''
                },
                {
                    field: 'jb',
                    title: '级别'
                },
                {
                    field: 'fdwdm',
                    title: '父点位代码'
                },
                {
                    field: 'deptId',
                    title: '单位ID'
                },
                {
                    field: 'userId',
                    title: '用户ID'
                },
                {
                    field: 'ejdwId',
                    title: '二级单位ID'
                },
                {
                    field: 'ejdwName',
                    title: '二级单位名称'
                },
                {
                    field: 'zyqId',
                    title: '作业区ID'
                },
                {
                    field: 'zyqName',
                    title: '作业区名称'
                },
                {
                    field: 'parentId',
                    title: '父部门id'
                },
                {
                    field: 'parentName',
                    title: '父部门名称'
                },
                {
                    field: 'bmId',
                    title: '部门ID'
                },
                {
                    field: 'bmName',
                    title: '部门名称'
                },
                {
                    field: 'deptIdId',
                    title: ''
                },
                {
                    field: 'dw3Id',
                    title: '点位3级ID'
                },
                {
                    field: 'dw3Name',
                    title: '点位3级名称'
                },
                {
                    field: 'dw4Id',
                    title: '点位4级ID'
                },
                {
                    field: 'dw4Name',
                    title: '点位4级名称'
                },
                {
                    field: 'dw5Id',
                    title: '点位5级ID'
                },
                {
                    field: 'dw5Name',
                    title: '点位5级名称'
                },
                {
                    field: 'switchStatus',
                    title: '开关状态'
                },
                {
                    field: 'frequency',
                    title: '频率 秒'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>